#ifndef LRCPAGE_H
#define LRCPAGE_H

#include <QWidget>
#include<QPropertyAnimation>
#include<QFile>

namespace Ui {
class LrcPage;
}

struct lyricLine{
    qint64 _time;
    QString _text;
    lyricLine(qint64 time, QString text)
        :_time(time)
        ,_text(text)
    {}
};

class LrcPage : public QWidget
{
    Q_OBJECT

public:
    explicit LrcPage(QWidget *parent = nullptr);
    ~LrcPage();


public:
    bool parseLrc(const QString& lrcPath);
    int getLineLrcWordIndex(qint64 time);
    QString getLineWord(qint64 index);
    void showLrcWord(int time);
    void setMusicName(const QString& name);
    void setSingerName(const QString& name);
private:
    Ui::LrcPage *ui;

    QPropertyAnimation* animation;

    QVector<lyricLine> lrcLines;
};

#endif // LRCPAGE_H
